package com.whmnx.my.ui.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.ViewGroup;

import androidx.annotation.Nullable;

import com.whmnx.my.R;
import com.whmnx.my.databinding.FragmentFabuShougoBinding;
import com.whmnx.my.ui.viewmodel.ShouGoModel;

import me.goldze.mvvmhabit.BR;
import me.goldze.mvvmhabit.base.BaseFragment;

/**
 * author : huang
 * date   : 2020/10/10 0010 14:53
 * version: 1.0
 * @author Administrator
 */
public class FabuShouGouFragment extends BaseFragment<FragmentFabuShougoBinding, ShouGoModel> {
    @Override
    public int initContentView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        return R.layout.fragment_fabu_shougo;
    }

    @Override
    public int initVariableId() {
        return BR.viewModel;
    }

    @Override
    public void initData() {
        super.initData();
        //得到从Activity传来的数据
        Bundle bundle = this.getArguments();
        int index = bundle.getInt("index");
        viewModel.initToolbar(this,index);
    }
}
